# _*_ coding : utf-8 _*_
# @Time : 2023/3/17 0017 16:07
# @Author : 菜鸟王小二
# @File : 28_requests的基本使用
# @Project : python爬虫

import requests

url = 'http://www.baidu.com'

response = requests.request(method='get',url=url)
# 更改返回的编码，不然为乱码
response.encoding = 'utf-8'

# 返回网页源码
# print(response.text)

# 返回字节形式的网页源码
# print(response.content)

print(response.url)

print(response.headers)

# 响应的状态码
print(response.status_code)
